package com.yxc.translationdemo.entity;

import com.yxc.translationdemo.annotation.Translation;
import com.yxc.translationdemo.const_enum.CountryEnum;
import com.yxc.translationdemo.transcode.SexDataSource;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.FieldNameConstants;

/**
 * @author: YXC
 * @time: 2022/12/5 19:26
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@FieldNameConstants
public class Student implements Translated{

    private String name;

    @Translation(fieldName = Fields.sexTrans, dataSource = SexDataSource.class)
    private Integer sex;

    @Translation(fieldName = "countryTrans", dataSource = CountryEnum.class)
    private Integer country;

    private String sexTrans;

    private String countryTrans;

}
